//
//  RightMenuViewController.m
//  SXH
//
//  Created by 房 国生 on 15/6/25.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import "RightMenuViewController.h"
#import "SpotDetailViewController.h"

@interface RightMenuViewController ()

@end

@implementation RightMenuViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.semiTableView.backgroundColor = [UIColor clearColor];
    self.view.backgroundColor = [UIColor blackColor];
    self.view.alpha = 0.5;
    self.semiTitleLabel.backgroundColor = [UIColor clearColor];
    self.semiTitleLabel.textColor = [UIColor whiteColor];
    //    for (int i = 0; i < 100; i++) {
    //        [self.dateSourceArray addObject:[NSString stringWithFormat:@"SemiData%d", i]];
    self.dateSourceArray = self.myMusic.musicArray;
    //    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.dateSourceArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
    }
    cell.backgroundColor = [UIColor clearColor];
    SpotEntity *music = [self.dateSourceArray objectAtIndex:indexPath.row];
    cell.textLabel.text = music.title;
    cell.selectionStyle = UITableViewCellSelectionStyleGray;//该表格选中后没有颜色
    
    cell.textLabel.textColor = [UIColor whiteColor];
    cell.textLabel.backgroundColor = [UIColor clearColor];
    //    cell.textLabel.backgroundColor = [UIColor blackColor];
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self.myMusic playTable:indexPath.row];
}
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [MobClick beginLogPageView:@"RightMenuViewController"];
}
- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [MobClick endLogPageView:@"RightMenuViewController"];
}

@end
